package com.sky.mapper.admin;


import com.github.pagehelper.Page;
import com.sky.annotation.AutoFill;
import com.sky.dto.EmployeeLoginDTO;
import com.sky.dto.EmployeePageQueryDTO;
import com.sky.enumeration.OperationType;
import com.sky.pojo.Employee;
import org.apache.ibatis.annotations.*;


@Mapper
public interface EmployeeMapper {
    @AutoFill(value = OperationType.INSERT)
    void insert(Employee employee);

    /**
     * 根据用户名查询员工
     * @param username
     * @return
     */
    @Select("select * from employee where username = #{username}")
    Employee getByUsername(String username);
    Page<Employee> pageQuery(EmployeePageQueryDTO employeePageQueryDTO);
    void startOrStop(@Param("status") int status,@Param("id") long id);
    Employee findById(Long id);
    @AutoFill(value = OperationType.UPDATE)
    void Upudate(Employee employee);

}
